package cn.tedu.order.controller;

import cn.tedu.order.entity.Order;
import cn.tedu.order.service.OrderService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.Random;

@RestController
public class OrderController {
    @Resource
    private OrderService orderService;
    @GetMapping("/create")//?userId=1&productId=1&count=10&money=100
    public String create(Order order){

        orderService.create(order);
        return "订单创建成功";

    }
}
